<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery-1.10.1.js" ></script>
    <script>
        $(document).ready(function(){
            /**
            $("li").on('click', function(){
                alert($(this).html())
            })**/

            $("ul").delegate("li", "click", 
                function(event) {
                    alert($(event.target).html())
                }
             )
            // 还想让ccc能点？？
            $("ul").append('<li>ccc</li>');
           
        })

    </script>
</head>
<body>
    <ul>
        <li>aaa</li>
        <li>bbb</li>
    </ul>

    <button>切换</button>
    <div id="a1">hello world</div>
    <script>

        $("button:contains('切换')").on("click", function() {
            $("#a1").fadeToggle(); // $("#a1").hide();隐藏 // show();显示
        })

    </script>
</body>
</html>